﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteMaster.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="Microhard.Framework.MVCHelper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    出库申请
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="section-header">
        <div class="title">
            <img src="<%=Url.Content("~/Content/images/ico-catalog.png")%>" alt="" />
               出库申请
        </div>
    </div>
     <table width="100%">
        <tr>
            <td class="adminTitle">
             
               &nbsp
            </td>
            <td class="adminData">
               &nbsp
            </td>
        </tr>
    </table>
    <p>
    </p>
    <table class="adminContent">
        <tr>
            <td>
              
               <% Html.Telerik().Grid<Microhard.WarehouseInsp.Buz.Models.OutInPutApplyModel>((List<Microhard.WarehouseInsp.Buz.Models.OutInPutApplyModel>)this.Model.Data).
                      Name("operation-grid").
                      ToolBar(t => t.Template(g =>
                  {
                      
              %>
      
               <div class="header-menu">
                    <ul class="t-widget t-reset t-header t-menu">
                        <li class="t-item  t-state-default">
                            <%=Html.Authorized_AddButton("btnAdd", "添加", "Create", "OutInPutApply")%>
                        </li>
                         <li class="t-item  t-state-default">
                            <%=Html.Authorized_UpdateButton("btnUpdate", "修改", "operation-grid", "Update", "OutInPutApply", "WarehouseInsp")%>
                        </li>
                        <li class="t-item  t-state-default">
                            <%=Html.Authorized_DeleteButton("btnDelete", "删除", "operation-grid", "Delete", "OutInPutApply", "WarehouseInsp")%>
                        </li>
                   </ul>
                </div>

           <% 
                    
                    })).Columns(columns=>{

                        columns.Bound(x => x.OutInPutApplyID).
                             Template(x => 
                                             Html.CheckBox("checkedRecords", 
                                             new { value = x.OutInPutApplyID, @class = "gridCks"  }))
                            .ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= OutInPutApplyID #>' class='gridCks'  />")
                            .HtmlAttributes(new { style = "text-align:center" }).Title("选择");
                              columns.Template(x => {%>
                              <a href="#" onclick="winViewPrjDetail_ShowDetail(this)" id="<%=x.OutInPutApplyID%>">
                              <%=x.PrjName %></a>
                <% }).ClientTemplate("<a href='#' id='<#=OutInPutApplyID#>' onclick='winViewPrjDetail_ShowDetail(this)'><#=PrjName #></a>").Title("项目名称");
                            
                            columns.Bound(x => x.ApplyDate).Title("申请日期");
                            columns.Bound(x=>x.ApproverName).Title("审批人");
                            columns.Bound(x=>x.ApproveDate).Title("审批日期");
                            columns.Bound(x => x.strState).Title("出库申请状态");
                          
                    }).Pageable(settings => settings.Total(Model.Total).PageSize(Html.GetGridPageSize()).Position(GridPagerPosition.Top))
                      //绑定搜索按钮，执行对应的action
                    .DataBinding(dataBinding => dataBinding.Ajax().Select("_List", "OutInPutApply"))
                    .EnableCustomBinding(true)
                    .Render();
                  %>

            </td>
        </tr>
    </table>
     <%Html.RenderPartial("ViewDetailCtr", new Microhard.WarehouseInsp.WebUI.Models.ViewDetailCtrModel
      {
          ActionName = "_AjaxViewDetail",
          AreaName = "WarehouseInsp",
          ControllerName = "OutInPutApply",
          CtrID = "winViewPrjDetail",
          WinWidth = 900,
          WinHeight = 500
      }); %>
</asp:Content>
